package com.devbobcorn.nekoration.blocks;

import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockView;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.state.StateManager;
import net.minecraft.block.ShapeContext;
import net.minecraft.util.shape.VoxelShape;

public class PotBlock extends DyeableBlock {
    public final VoxelShape Shape;
    public final double Radius;

    public PotBlock(Settings settings, double radius) {
        super(settings);
        Radius = radius;
        Shape = Block.createCuboidShape(8.0D - Radius, 0.0D, 8.0D - Radius, 8.0D + Radius, 16.0D, 8.0 + Radius);
        this.setDefaultState(this.stateManager.getDefaultState().with(COLOR, 14));
    }

    public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext ctx) {
        return Shape;
    }

    protected void appendProperties(StateManager.Builder<Block, BlockState> s) {
        s.add(COLOR);
    }

    /* @Override // This is implemented via Block Tag in Fabric version
    public boolean canSustainPlant(BlockState state, BlockView world, BlockPos pos, Direction facing, net.minecraftforge.common.IPlantable plantable)
    {
        //PlantType type = plantable.getPlantType(world, pos.relative(facing));
        //return type != PlantType.WATER;
    } */
}
